package com.tw.modules.serviceImpl;

import com.tw.modules.entity.Plan;
import com.tw.modules.dao.PlanMapper;
import com.tw.modules.service.PlanService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author maxiaodong
 * @since 2018-04-07
 */
@Service
public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements PlanService {
	@Autowired
	PlanMapper dao;
	
	/**
	 * 根据手机号查询计划，返回集合
	 */
	@Override
	public List<Plan> selectPlansByPhone(long phone) {
		
		return dao.selectPlansByPhone(phone);
	}

	@Override
	public boolean deleteByPid(int pid) {
		if (dao.deleteByPid(pid)!=0) {
			return true;
		}
		return false;
		
	}
}
